package org.dromara.finance.domain.bo;

import org.dromara.finance.domain.SaleInvoiceList;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 销售发票子表业务对象 sale_invoice_list
 *
 * @author xxy
 * @date 2025-08-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SaleInvoiceList.class, reverseConvertGenerate = false)
public class SaleInvoiceListBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 销售发票主表ID
     */
    @NotNull(message = "销售发票主表ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long saleInvoiceId;

    /**
     * 发票入账日期
     */
    @NotNull(message = "发票入账日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date recordDate;

    /**
     * 销售发票号
     */
    @NotBlank(message = "销售发票号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String saleInvoiceNum;

    /**
     * 相关凭证号
     */
    @NotBlank(message = "相关凭证号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String voucherNum;

    /**
     * 原币价税合计
     */
    @NotNull(message = "原币价税合计不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalTotalAmount;

    /**
     * 原币无税金额
     */
    @NotNull(message = "原币无税金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalAmount;

    /**
     * 原币税额
     */
    @NotNull(message = "原币税额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalTaxedAmount;

    /**
     * 币种
     */
    @NotNull(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long currency;

    /**
     * 汇率
     */
    @NotNull(message = "汇率不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal exchangeRate;

    /**
     * 本币价税合计
     */
    @NotNull(message = "本币价税合计不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localTotalAmount;

    /**
     * 本币无税金额
     */
    @NotNull(message = "本币无税金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localAmount;

    /**
     * 本币税额
     */
    @NotNull(message = "本币税额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localTaxedAmount;

    /**
     * 备注
     */
    private String remark;


}
